package com.clw.classfile.attribute.info;

import com.clw.classfile.BytesReader;

/**
 * Created by chengliwei on 2018/11/16.
 */
public class Exceptions extends AttributeInfo {

    private short numberOfExceptions;
    private short[] exceptionIndexTable; // 指向常量池中CONSTANT_Class_info型常量的索引，代表了该受查异常的类型

    public Exceptions(BytesReader reader) {
        super(reader.readInt());
        this.numberOfExceptions = reader.readShort();
        this.exceptionIndexTable = new short[numberOfExceptions];
        for (int i = 0; i < numberOfExceptions; i++) {
            exceptionIndexTable[i] = reader.readShort();
        }
    }
}
